#include <fstream>
#include <iostream>

#include <libtcod/libtcod.hpp>

#include "Log.hpp"

bool Log::Verbose;
std::ofstream Log::File;

void Log::init(std::string logFile, bool verbose)
{
    Verbose = verbose;

    File.open(logFile.c_str());
}

void Log::write(std::string message)
{
    if (Verbose)
        std::cout<< message << std::endl;

    File << message << std::endl;
    File.flush();
}
